<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf8" />
    <title>可用可信家庭市场</title>
    <!--                       CSS                       -->
    <!-- Reset Stylesheet -->
    <link rel="stylesheet" href="/static/css/reset.css" type="text/css" media="screen" />
    <!-- Main Stylesheet -->
    <link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
    <!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
    <link rel="stylesheet" href="/static/css/invalid.css" type="text/css" media="screen" />
    <!--                       Javascripts                       -->
    <!-- jQuery -->
    <script type="text/javascript" src="/static/scripts/jquery-1.3.2.min.js"></script>
    <!-- jQuery Configuration -->
    <script type="text/javascript" src="/static/scripts/simpla.jquery.configuration.js"></script>
    <!-- Facebox jQuery Plugin -->
    <script type="text/javascript" src="/static/scripts/facebox.js"></script>
    <!-- jQuery WYSIWYG Plugin -->
    <script type="text/javascript" src="/static/scripts/jquery.wysiwyg.js"></script>
    <!-- jQuery Datepicker Plugin -->
    <script type="text/javascript" src="/static/scripts/jquery.datePicker.js"></script>
    <script type="text/javascript" src="/static/scripts/jquery.date.js"></script>
    <!-- jQuery -->

    <link rel="stylesheet" type="text/css" media="all" href="/static/css/motai.css">

    <style>
        body{
            font-family:黑体;
        }
        :after,:before{-webkit-box-sizing:border-box;box-sizing:border-box}
        .dashboard-tile.detail, .dashboard-tile.header {
            position: relative;
            overflow: hidden;
        }

        .dashboard-tile.tile-red {
            background-color: #e84c3d;
            color: #fff;
            height:110px;
            width:300px;
        }
        .dashboard-tile.tile-turquoise {
            background-color: #1abc9c;
            color: #fff;
            height:110px;
            width:300px;
        }
        .dashboard-tile.tile-purple {
            background-color: #9a59b5;
            color: #fff;
            height:110px;
            width:300px;
        }
        .dashboard-tile {
            background-color: #fff;
            color: #555;
            margin-bottom: 15px;
            padding: 10px;
            -webkit-border-radius: 3px;
            -moz-border-radius: 3px;
            -ms-border-radius: 3px;
            -o-border-radius: 3px;
            border-radius: 3px;
        }
        .big{
            width:350px;
            height:140px;
            float:left;
        }
        .text-left {
            text-align: left;
        }
        .table1{
        	font-size:15px;
        	line-height:15px;
        }
        /* red */
.red {
color: #faddde;
border: solid 1px #980c10;
background: #d81b21;
background: -webkit-gradient(linear, left top, left bottom, from(#ed1c24), to(#aa1317));
background: -moz-linear-gradient(top, #ed1c24, #aa1317);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed1c24', endColorstr='#aa1317');
}
.red:hover {
background: #b61318;
background: -webkit-gradient(linear, left top, left bottom, from(#c9151b), to(#a11115));
background: -moz-linear-gradient(top, #c9151b, #a11115);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#c9151b', endColorstr='#a11115');
}
.red:active {
color: #de898c;
background: -webkit-gradient(linear, left top, left bottom, from(#aa1317), to(#ed1c24));
background: -moz-linear-gradient(top, #aa1317, #ed1c24);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#aa1317', endColorstr='#ed1c24');
}
.me{
	width:800px;
	height:30px;
	margin-bottom:10px;
	
}
.snmenu{
	width:80px;
	height:30px;
	background-color:#458B74;
	float:left;
	margin-left:10px;
	color:#ffffff;
	text-align:center;
	line-height:30px;
	font-size:14px;
}
.currentm{
	background-color:#36648B;
}
.snsub{
	width:80px;
	height:26px;
	background-color:#36648B;
	color:#ffffff;
}
.snadd{
	width:60px;
	height:30px;
}
.sntype{
	width:600px;
	font-size:14px;
	line-height:20px;
	border:1px solid #36648B;
}
    </style>
</head>
<body>
<div id="body-wrapper">
    <!-- Wrapper for the radial gradient background -->
    <div id="sidebar">
        <div id="sidebar-wrapper">

            <div id="profile-links">
                <!-- Logo (221px wide) -->
                <a href="#"><img id="logo" src="/static/images/logo.png" alt="Simpla Admin logo" /></a>

                {$_COOKIE['user_name']},你好 <br/>
                | 
                {if condition="!empty($_COOKIE['jtsc_power'])"}
                <a href="/index.php/index/admin/uexit" title="Sign Out">退出</a>
                {else/}
                <a href="/index.php/index/index/uexit" title="Sign Out">退出</a>
                {/if}
                 
            </div>

            <ul id="main-nav">
                <!-- Accordion Menu -->
                <!--<li> <a href="#/" class="nav-top-item no-submenu">-->
                    <!--&lt;!&ndash; Add the class "no-submenu" to menu items with no sub menu &ndash;&gt;-->
                    <!--Dashboard </a> </li>-->

             {if condition="!empty($powers['order_action'])"}
                <li> <a href="#" class="nav-top-item"> 订单操作</a>
                    <ul>
                    	
                        <li><a href="/index.php/index/index/neworder_list">新订单</a></li>
                        <!-- Add class "current" to sub menu items also -->
                        <li><a href="/index.php/index/index/addorder">创建新订单</a></li>
                        <li><a href="/index.php/index/index/allorder_list">所有订单</a></li>
                    </ul>
                </li>
           	{/if}
           	 {if condition="!empty($powers['cg_action'])"}
                <li> <a href="#" class="nav-top-item"> 采购单 </a>
                    <ul>
                        <li><a href="/index.php/index/index/newcg_list">待处理 采购单</a></li>
                        <li><a href="/index.php/index/index/cg_history">采购单历史</a></li>
                    </ul>
                </li>
             {/if}
              {if condition="!empty($powers['table_action'])"}
                <li> <a href="#" class="nav-top-item"> 报表 </a>
                    <ul>
                        <li><a href="/index.php/index/biao/daybiao">日报表</a></li>
                        <li><a href="/index.php/index/biao/yuebiao">月报表</a></li>
                        <li><a href="/index.php/index/biao/nianbiao">年报表</a></li>
                    </ul>
                </li>
               {/if}
                {if condition="!empty($powers['goods_action'])"}
                <li> <a href="#" class="nav-top-item">菜品管理 </a>
                    <ul>
                        <li><a href="/index.php/index/goods/goods">所有菜品</a></li>
                        <li><a href="/index.php/index/goods/categorys">所有分类</a></li>
                    </ul>
                </li>
                {/if}
                
                 {if condition="!empty($powers['promotion_action'])"}
                 <li> <a href="#" class="nav-top-item"> 推广活动 </a>
                    <ul>
                        <li><a href="/index.php/index/promotion/snlist">SN优惠码</a></li>
                    </ul>
                </li>
                {/if}
                
                
                <li> <a href="#" class="nav-top-item"> 个人信息 </a>
                    <ul>
                        <li><a href="/index.php/index/index/user_info">查看信息</a></li>
                        <li><a href="/index.php/index/index/update_pass">修改密码</a></li>
                    </ul>
                </li>
       
                {if condition="!empty($powers['super'])"}
                 <li><a href="#" class="nav-top-item"> 用户管理 </a>
                 	<ul>
                        <li><a href="/index.php/index/admin/user_admin">用户权限</a></li>
                    </ul>
                 </li>
                {/if}

            </ul>
            <!-- End #main-nav -->

        </div>
    </div>
    <!-- End #sidebar -->
    <div id="main-content">
  		<div  class="me">
  			<ul>
  				
  				
  				<a href="/index.php/index/promotion/snlist" ><li class="snmenu"> SN码列表</li></a>
  				<a href="/index.php/index/promotion/snadd" ><li class="snmenu currentm"> 添加SN码</li></a>
  				
  				<li style="float:left;margin-left:50px;">
  					<form method="post" action="/index.php/index/promotion/sncheck">
  						<input type="text" name="sn" value="" placeholder="输入SN码"/>
  						<input type="submit" value="SN码核销" class="snsub"/>	
  					</form>
  				</li>
  			</ul>
  		</div>
       
        <!-- End .clear -->
        <div class="content-box">
            <!-- Start Content Box -->
            <div class="content-box-header">
                <h3>SN码详细</h3>
            </div>
            <!-- End .content-box-header -->
            <div class="content-box-content">
                <div class="tab-content default-tab" id="tab1">
					<div class="sntype">
						<ul>
						 	<li>SN类名：{$sntype.name}</li>
						 	<li>数量：{$sntype.limt}</li>
						 	<li>长度：{$sntype.long}</li>
						 	<li>
						 		形式：
						 		{if condition="$sntype['take']==1"}
						 			纯数字
						 		{elseif condition="$sntype['take']==2"}
						 			纯字母
						 		{elseif condition="$sntype['take']==3"}
						 			混合
						 		{/if}
						 		
						 	</li>
						 	<li>开头码：{$sntype.snstart}</li>
						 	<li>结尾码：{$sntype.snend}</li>
						 	<li>状态：{$sntype.status}</li>
						 	<li>添加时间：{$sntype.add_time|date="Y-m-d H:i",###}</li>
						 </ul>
					</div>
                    <table class="table1">
                        <thead>
                        <tr>
                            <th width="5%">序号</th>
                            <th width="5%">SN码（中奖号）</th>
                            <th width="10%">是否已使用</th>
                            <th width="15%">使用时间</th>
                            <th width="15%">中奖者手机号</th>
                            <th width="15%" style="text-align:center;">中奖者微信码</th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php $p=1;?>
                   {volist name="list" id="vo" }
                        {if condition="$p%2==1"}
                        <tr style="height:50px;" onmouseover="this.style.backgroundColor='#b9df70';" onmouseout="this.style.backgroundColor='#EAEAEA';">
                         {else/}
                        <tr style="height:50px;"onmouseover="this.style.backgroundColor='#b9df70';" onmouseout="this.style.backgroundColor='#FFFFFF';">
                        {/if}
                            <?php ++$p;?>
                            <td>{$vo.nid}</td>

                            <td>{$vo.sncode}</td>
                            <td>
                            	{if condition="$vo['used']==1"}
                            		已使用
                            	{else/}
                            		未使用
                            	{/if}
                            </td>
                            <td>
                            	{if condition="$vo['usetime'] != 0"}
                            	{$vo.usetime|date="Y-m-d H:i",###}
                            	{/if}
                            </td>
                            <td>{$vo.tel}</td>
                            <td>{$vo.wechat}</td>
                        </tr>
                    {/volist}
                        </tbody>
                    </table>
                </div>
                <!-- End #tab1 -->

            </div>
            <!-- End .content-box-content -->
        </div>
        <!-- End .content-box -->



    </div>
    <!-- End #main-content -->
</div>
<script src="http://cdn.bootcss.com/jquery/3.1.0/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/amazeui/2.7.2/js/amazeui.min.js"></script>
<script type="text/javascript">

    function setCookie(value)
    {
        setCookie("menus",value,1000);

// setCookie("menus",value,1000);
// setCookie("menus",value,1000);
    }

    $('.button').click(function(){
        $sdata=$(this).attr('datas');

        $.ajax({
            type:"POST",
            url:"test.html",
            data: "data="+encodeURI($sdata),
            success:function(msg){
                $('.am-modal-bd').html(msg);
            },
            error:function(XMLHttpRequest, textStatus, thrownError){}
        });
    });

   message_tips();
	/**
	 * ajax提醒
	 **/
	a = 1;
	function fn(){

		if(a == 1){
			$('#message_tips').css({color:'white'});
			$('#message_tips2').css({color:'white'});
			a = 0;
		}else{
			$('#message_tips').css({color:'#b9df70'});
			$('#message_tips2').css({color:'#b9df70'});
			a = 1;
		}
	}
	var myInterval;
	function message_tips(){
		$.get("/index.php/index/index/tips", function(data){
			if(data != $('#message_tips').html()){
				$('#message_tips').css({color:'#b9df70'});
				myInterval = setInterval(fn,5000);
				$('#message_tips2').css({color:'#b9df70'});
				$("#message_audio").html("<audio id='ttsoundplayer'  autoplay='autoplay'><source src='/static/sound/1583.wav' type='audio/wav'></audio>");

			} else {
				$("#message_audio").html('');
				if(data == 0){
					$('#message_tips').css({color:'white'});
					clearInterval(myInterval);
				}
			}

			$('#message_tips').html(data);
			$('#message_tips2').html(data);
		},'json');
		setTimeout('message_tips()',10000);
	}
    function firm(e)
    {
        if(confirm("你确定要取消该订单？"))
        {
            //如果是true ，那么就把页面转向
            location.href="/index.php/index/index/cancel_order/order_id/"+e;
        }
        else
        {
            location.href="";
        }
    }

 function diaodufirm(e)
    {
        if(confirm("你确定要将该订单调度到博美店吗？"))
        {
            //如果是true ，那么就把页面转向
            
           document.getElementById('diaoduform'+e).submit();
        }
        else
        {
            return false;
        }
    }
</script>


</body>
</html>
